using Microsoft.Win32;
using System;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Windows.Forms;
using System.Xml;
namespace SS
{
	public class FrmCongif : Form
	{
		private IContainer components = null;
		private TabPage tabPage1;
		private CheckBox ckbRunScript;
		private Button CmdTest;
		private Button CmdSave;
		private Label label4;
		private TextBox TxtPass;
		private TextBox TxtUserID;
		private TextBox TxtData;
		private TextBox TxtServer;
		private Label label3;
		private Label label2;
		private Label label1;
		private TabControl tabCodeID;
		private TabPage tabPage2;
		private Button tabBtn2Save;
		private Button tab2btnClose;
		private Label label5;
		private NumericUpDown nudNumber;
		private Label label6;
		private CheckBox ckbWarningNumber;
		private CheckBox ckbWarningDate;
		private Label label7;
		private NumericUpDown nudNumberProduct;
		private Label label8;
		private TabPage tabPage3;
		private Button btnTab3Save;
		private Button btnTab3Close;
		private DataGridView dgvSysParameter;
		private Button btnEdit;
		private DataGridViewTextBoxColumn Column7;
		private DataGridViewTextBoxColumn Column2;
		private DataGridViewCheckBoxColumn Column5;
		private DataGridViewTextBoxColumn Money;
		private TabPage tabPage4;
		private Button btnTab4Save;
		private Button btnTab4Close;
		private TextBox txtPerfixOut;
		private Label label10;
		private TextBox txtPerfixIn;
		private Label label9;
		private TextBox txtPerfixOutRetail;
		private Label label11;
		private TabPage tabPage5;
		private Button tab5BtnSave;
		private Button tab5BtnClose;
		private Button btnReset;
		private Label label12;
		private TextBox txtshortDateFormat;
		private Label label13;
		private TextBox txtsLongDate;
		private Label label15;
		private Label label14;
		private Label label16;
		private ComboBox cbbSizePaper;
		private RadioButton rbLaserPrint;
		private RadioButton rbScrollPrint;
		private Label label17;
		private XmlDocument xmlDoc = new XmlDocument();
		private Func objFunc = new Func();
		public string userName = "";
		public string fullName = "";
		public bool isFirst = true;
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
			DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
			ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(FrmCongif));
			this.tabPage1 = new TabPage();
			this.ckbRunScript = new CheckBox();
			this.CmdTest = new Button();
			this.CmdSave = new Button();
			this.label4 = new Label();
			this.TxtPass = new TextBox();
			this.TxtUserID = new TextBox();
			this.TxtData = new TextBox();
			this.TxtServer = new TextBox();
			this.label3 = new Label();
			this.label2 = new Label();
			this.label1 = new Label();
			this.tabCodeID = new TabControl();
			this.tabPage2 = new TabPage();
			this.label7 = new Label();
			this.nudNumberProduct = new NumericUpDown();
			this.label8 = new Label();
			this.ckbWarningDate = new CheckBox();
			this.ckbWarningNumber = new CheckBox();
			this.label6 = new Label();
			this.nudNumber = new NumericUpDown();
			this.label5 = new Label();
			this.tabBtn2Save = new Button();
			this.tab2btnClose = new Button();
			this.tabPage3 = new TabPage();
			this.btnEdit = new Button();
			this.dgvSysParameter = new DataGridView();
			this.Column7 = new DataGridViewTextBoxColumn();
			this.Column2 = new DataGridViewTextBoxColumn();
			this.Column5 = new DataGridViewCheckBoxColumn();
			this.Money = new DataGridViewTextBoxColumn();
			this.btnTab3Save = new Button();
			this.btnTab3Close = new Button();
			this.tabPage4 = new TabPage();
			this.label16 = new Label();
			this.cbbSizePaper = new ComboBox();
			this.txtPerfixOutRetail = new TextBox();
			this.label11 = new Label();
			this.txtPerfixOut = new TextBox();
			this.label10 = new Label();
			this.txtPerfixIn = new TextBox();
			this.label9 = new Label();
			this.btnTab4Save = new Button();
			this.btnTab4Close = new Button();
			this.tabPage5 = new TabPage();
			this.label15 = new Label();
			this.label14 = new Label();
			this.tab5BtnSave = new Button();
			this.tab5BtnClose = new Button();
			this.btnReset = new Button();
			this.label12 = new Label();
			this.txtshortDateFormat = new TextBox();
			this.label13 = new Label();
			this.txtsLongDate = new TextBox();
			this.rbLaserPrint = new RadioButton();
			this.rbScrollPrint = new RadioButton();
			this.label17 = new Label();
			this.tabPage1.SuspendLayout();
			this.tabCodeID.SuspendLayout();
			this.tabPage2.SuspendLayout();
			((ISupportInitialize)this.nudNumberProduct).BeginInit();
			((ISupportInitialize)this.nudNumber).BeginInit();
			this.tabPage3.SuspendLayout();
			((ISupportInitialize)this.dgvSysParameter).BeginInit();
			this.tabPage4.SuspendLayout();
			this.tabPage5.SuspendLayout();
			base.SuspendLayout();
			this.tabPage1.Controls.Add(this.ckbRunScript);
			this.tabPage1.Controls.Add(this.CmdTest);
			this.tabPage1.Controls.Add(this.CmdSave);
			this.tabPage1.Controls.Add(this.label4);
			this.tabPage1.Controls.Add(this.TxtPass);
			this.tabPage1.Controls.Add(this.TxtUserID);
			this.tabPage1.Controls.Add(this.TxtData);
			this.tabPage1.Controls.Add(this.TxtServer);
			this.tabPage1.Controls.Add(this.label3);
			this.tabPage1.Controls.Add(this.label2);
			this.tabPage1.Controls.Add(this.label1);
			this.tabPage1.Location = new Point(4, 24);
			this.tabPage1.Name = "tabPage1";
			this.tabPage1.Padding = new Padding(3);
			this.tabPage1.Size = new Size(472, 185);
			this.tabPage1.TabIndex = 0;
			this.tabPage1.Text = "Cơ sở dữ liệu";
			this.tabPage1.UseVisualStyleBackColor = true;
			this.ckbRunScript.AutoSize = true;
			this.ckbRunScript.Location = new Point(9, 220);
			this.ckbRunScript.Name = "ckbRunScript";
			this.ckbRunScript.Size = new Size(123, 19);
			this.ckbRunScript.TabIndex = 8;
			this.ckbRunScript.Text = "Tạo cơ sở dữ liệu";
			this.ckbRunScript.UseVisualStyleBackColor = true;
			this.ckbRunScript.Visible = false;
			this.CmdTest.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.CmdTest.BackColor = Color.FromArgb(192, 255, 255);
			this.CmdTest.Cursor = Cursors.Hand;
			this.CmdTest.FlatStyle = FlatStyle.System;
			this.CmdTest.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.CmdTest.ImageAlign = ContentAlignment.MiddleLeft;
			this.CmdTest.Location = new Point(294, 151);
			this.CmdTest.Name = "CmdTest";
			this.CmdTest.Size = new Size(84, 28);
			this.CmdTest.TabIndex = 5;
			this.CmdTest.Text = "Ghi nhận";
			this.CmdTest.UseVisualStyleBackColor = false;
			this.CmdTest.Click += new EventHandler(this.CmdTest_Click);
			this.CmdSave.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.CmdSave.BackColor = Color.FromArgb(192, 255, 255);
			this.CmdSave.Cursor = Cursors.Hand;
			this.CmdSave.FlatStyle = FlatStyle.System;
			this.CmdSave.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.CmdSave.ImageAlign = ContentAlignment.MiddleLeft;
			this.CmdSave.Location = new Point(382, 151);
			this.CmdSave.Name = "CmdSave";
			this.CmdSave.Size = new Size(84, 28);
			this.CmdSave.TabIndex = 6;
			this.CmdSave.Text = "Thoát  [ESC]";
			this.CmdSave.UseVisualStyleBackColor = false;
			this.CmdSave.Click += new EventHandler(this.CmdSave_Click);
			this.label4.AutoSize = true;
			this.label4.Location = new Point(47, 113);
			this.label4.Name = "label4";
			this.label4.Size = new Size(62, 15);
			this.label4.TabIndex = 7;
			this.label4.Text = "Mật khẩu :";
			this.TxtPass.Location = new Point(112, 110);
			this.TxtPass.Name = "TxtPass";
			this.TxtPass.PasswordChar = '*';
			this.TxtPass.Size = new Size(336, 21);
			this.TxtPass.TabIndex = 4;
			this.TxtUserID.Location = new Point(112, 81);
			this.TxtUserID.Name = "TxtUserID";
			this.TxtUserID.Size = new Size(336, 21);
			this.TxtUserID.TabIndex = 3;
			this.TxtData.Location = new Point(112, 52);
			this.TxtData.Name = "TxtData";
			this.TxtData.Size = new Size(336, 21);
			this.TxtData.TabIndex = 2;
			this.TxtServer.Location = new Point(112, 23);
			this.TxtServer.Name = "TxtServer";
			this.TxtServer.Size = new Size(336, 21);
			this.TxtServer.TabIndex = 1;
			this.label3.AutoSize = true;
			this.label3.Location = new Point(42, 84);
			this.label3.Name = "label3";
			this.label3.Size = new Size(67, 15);
			this.label3.TabIndex = 5;
			this.label3.Text = "Tài khoản :";
			this.label2.AutoSize = true;
			this.label2.Location = new Point(56, 55);
			this.label2.Name = "label2";
			this.label2.Size = new Size(53, 15);
			this.label2.TabIndex = 3;
			this.label2.Text = "Dữ liệu :";
			this.label1.AutoSize = true;
			this.label1.Location = new Point(52, 26);
			this.label1.Name = "label1";
			this.label1.Size = new Size(57, 15);
			this.label1.TabIndex = 1;
			this.label1.Text = "Máy chủ :";
			this.tabCodeID.Controls.Add(this.tabPage1);
			this.tabCodeID.Controls.Add(this.tabPage2);
			this.tabCodeID.Controls.Add(this.tabPage3);
			this.tabCodeID.Controls.Add(this.tabPage4);
			this.tabCodeID.Controls.Add(this.tabPage5);
			this.tabCodeID.Cursor = Cursors.Hand;
			this.tabCodeID.Location = new Point(2, 2);
			this.tabCodeID.Name = "tabCodeID";
			this.tabCodeID.SelectedIndex = 0;
			this.tabCodeID.Size = new Size(480, 213);
			this.tabCodeID.TabIndex = 0;
			this.tabPage2.Controls.Add(this.label7);
			this.tabPage2.Controls.Add(this.nudNumberProduct);
			this.tabPage2.Controls.Add(this.label8);
			this.tabPage2.Controls.Add(this.ckbWarningDate);
			this.tabPage2.Controls.Add(this.ckbWarningNumber);
			this.tabPage2.Controls.Add(this.label6);
			this.tabPage2.Controls.Add(this.nudNumber);
			this.tabPage2.Controls.Add(this.label5);
			this.tabPage2.Controls.Add(this.tabBtn2Save);
			this.tabPage2.Controls.Add(this.tab2btnClose);
			this.tabPage2.Location = new Point(4, 24);
			this.tabPage2.Name = "tabPage2";
			this.tabPage2.Padding = new Padding(3);
			this.tabPage2.Size = new Size(472, 185);
			this.tabPage2.TabIndex = 1;
			this.tabPage2.Text = "Cảnh báo";
			this.tabPage2.UseVisualStyleBackColor = true;
			this.label7.AutoSize = true;
			this.label7.Location = new Point(325, 56);
			this.label7.Name = "label7";
			this.label7.Size = new Size(63, 15);
			this.label7.TabIndex = 15;
			this.label7.Text = "sản phẩm";
			this.nudNumberProduct.Location = new Point(265, 53);
			NumericUpDown arg_CAF_0 = this.nudNumberProduct;
			int[] array = new int[4];
			array[0] = 1000;
			arg_CAF_0.Maximum = new decimal(array);
			this.nudNumberProduct.Name = "nudNumberProduct";
			this.nudNumberProduct.Size = new Size(50, 21);
			this.nudNumberProduct.TabIndex = 14;
			this.nudNumberProduct.TextAlign = HorizontalAlignment.Center;
			NumericUpDown arg_D0E_0 = this.nudNumberProduct;
			array = new int[4];
			array[0] = 10;
			arg_D0E_0.Value = new decimal(array);
			this.label8.AutoSize = true;
			this.label8.Location = new Point(163, 56);
			this.label8.Name = "label8";
			this.label8.Size = new Size(99, 15);
			this.label8.TabIndex = 13;
			this.label8.Text = "Cảnh báo trước :";
			this.ckbWarningDate.AutoSize = true;
			this.ckbWarningDate.Location = new Point(43, 80);
			this.ckbWarningDate.Name = "ckbWarningDate";
			this.ckbWarningDate.Size = new Size(153, 19);
			this.ckbWarningDate.TabIndex = 12;
			this.ckbWarningDate.Text = "Cảnh báo hạn sử dụng";
			this.ckbWarningDate.UseVisualStyleBackColor = true;
			this.ckbWarningNumber.AutoSize = true;
			this.ckbWarningNumber.Location = new Point(43, 26);
			this.ckbWarningNumber.Name = "ckbWarningNumber";
			this.ckbWarningNumber.Size = new Size(241, 19);
			this.ckbWarningNumber.TabIndex = 11;
			this.ckbWarningNumber.Text = "Mở chế độ cảnh báo số lượng hàng tồn";
			this.ckbWarningNumber.UseVisualStyleBackColor = true;
			this.label6.AutoSize = true;
			this.label6.Location = new Point(325, 108);
			this.label6.Name = "label6";
			this.label6.Size = new Size(33, 15);
			this.label6.TabIndex = 10;
			this.label6.Text = "ngày";
			this.nudNumber.Location = new Point(265, 105);
			NumericUpDown arg_F09_0 = this.nudNumber;
			array = new int[4];
			array[0] = 1000;
			arg_F09_0.Maximum = new decimal(array);
			NumericUpDown arg_F27_0 = this.nudNumber;
			array = new int[4];
			array[0] = 10;
			arg_F27_0.Minimum = new decimal(array);
			this.nudNumber.Name = "nudNumber";
			this.nudNumber.Size = new Size(50, 21);
			this.nudNumber.TabIndex = 9;
			this.nudNumber.TextAlign = HorizontalAlignment.Center;
			NumericUpDown arg_F86_0 = this.nudNumber;
			array = new int[4];
			array[0] = 10;
			arg_F86_0.Value = new decimal(array);
			this.label5.AutoSize = true;
			this.label5.Location = new Point(163, 108);
			this.label5.Name = "label5";
			this.label5.Size = new Size(99, 15);
			this.label5.TabIndex = 1;
			this.label5.Text = "Cảnh báo trước :";
			this.tabBtn2Save.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.tabBtn2Save.BackColor = Color.FromArgb(192, 255, 255);
			this.tabBtn2Save.Cursor = Cursors.Hand;
			this.tabBtn2Save.FlatStyle = FlatStyle.System;
			this.tabBtn2Save.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.tabBtn2Save.ImageAlign = ContentAlignment.MiddleLeft;
			this.tabBtn2Save.Location = new Point(294, 151);
			this.tabBtn2Save.Name = "tabBtn2Save";
			this.tabBtn2Save.Size = new Size(84, 28);
			this.tabBtn2Save.TabIndex = 7;
			this.tabBtn2Save.Text = "Ghi nhận";
			this.tabBtn2Save.UseVisualStyleBackColor = false;
			this.tabBtn2Save.Click += new EventHandler(this.tabBtn2Save_Click);
			this.tab2btnClose.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.tab2btnClose.BackColor = Color.FromArgb(192, 255, 255);
			this.tab2btnClose.Cursor = Cursors.Hand;
			this.tab2btnClose.FlatStyle = FlatStyle.System;
			this.tab2btnClose.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.tab2btnClose.ImageAlign = ContentAlignment.MiddleLeft;
			this.tab2btnClose.Location = new Point(382, 151);
			this.tab2btnClose.Name = "tab2btnClose";
			this.tab2btnClose.Size = new Size(84, 28);
			this.tab2btnClose.TabIndex = 8;
			this.tab2btnClose.Text = "Thoát  [ESC]";
			this.tab2btnClose.UseVisualStyleBackColor = false;
			this.tab2btnClose.Click += new EventHandler(this.tab2btnClose_Click);
			this.tabPage3.Controls.Add(this.btnEdit);
			this.tabPage3.Controls.Add(this.dgvSysParameter);
			this.tabPage3.Controls.Add(this.btnTab3Save);
			this.tabPage3.Controls.Add(this.btnTab3Close);
			this.tabPage3.Location = new Point(4, 24);
			this.tabPage3.Name = "tabPage3";
			this.tabPage3.Padding = new Padding(3);
			this.tabPage3.Size = new Size(472, 185);
			this.tabPage3.TabIndex = 2;
			this.tabPage3.Text = "Thông số hệ thống";
			this.tabPage3.UseVisualStyleBackColor = true;
			this.btnEdit.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.btnEdit.BackColor = Color.FromArgb(192, 255, 255);
			this.btnEdit.Cursor = Cursors.Hand;
			this.btnEdit.FlatStyle = FlatStyle.System;
			this.btnEdit.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnEdit.ImageAlign = ContentAlignment.MiddleLeft;
			this.btnEdit.Location = new Point(6, 151);
			this.btnEdit.Name = "btnEdit";
			this.btnEdit.Size = new Size(84, 28);
			this.btnEdit.TabIndex = 12;
			this.btnEdit.Text = "Thay đổi";
			this.btnEdit.UseVisualStyleBackColor = false;
			this.btnEdit.Click += new EventHandler(this.btnEdit_Click);
			this.dgvSysParameter.AllowUserToAddRows = false;
			this.dgvSysParameter.AllowUserToDeleteRows = false;
			this.dgvSysParameter.AllowUserToOrderColumns = true;
			this.dgvSysParameter.AllowUserToResizeColumns = false;
			this.dgvSysParameter.AllowUserToResizeRows = false;
			this.dgvSysParameter.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.dgvSysParameter.BackgroundColor = Color.White;
			this.dgvSysParameter.BorderStyle = BorderStyle.Fixed3D;
			this.dgvSysParameter.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.dgvSysParameter.Columns.AddRange(new DataGridViewColumn[]
			{
				this.Column7,
				this.Column2,
				this.Column5,
				this.Money
			});
			this.dgvSysParameter.Cursor = Cursors.Hand;
			this.dgvSysParameter.Location = new Point(6, 6);
			this.dgvSysParameter.MultiSelect = false;
			this.dgvSysParameter.Name = "dgvSysParameter";
			this.dgvSysParameter.ReadOnly = true;
			this.dgvSysParameter.RowHeadersVisible = false;
			this.dgvSysParameter.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
			this.dgvSysParameter.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
			this.dgvSysParameter.Size = new Size(460, 139);
			this.dgvSysParameter.TabIndex = 11;
			this.Column7.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column7.DataPropertyName = "ID";
			dataGridViewCellStyle.Format = "D";
			dataGridViewCellStyle.NullValue = null;
			this.Column7.DefaultCellStyle = dataGridViewCellStyle;
			this.Column7.HeaderText = "ID";
			this.Column7.MinimumWidth = 400;
			this.Column7.Name = "Column7";
			this.Column7.ReadOnly = true;
			this.Column7.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column7.Visible = false;
			this.Column7.Width = 400;
			this.Column2.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
			this.Column2.DataPropertyName = "Name";
			this.Column2.HeaderText = "Tham số";
			this.Column2.MinimumWidth = 120;
			this.Column2.Name = "Column2";
			this.Column2.ReadOnly = true;
			this.Column2.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column5.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column5.DataPropertyName = "Active";
			this.Column5.HeaderText = "Trạng thái";
			this.Column5.MinimumWidth = 100;
			this.Column5.Name = "Column5";
			this.Column5.ReadOnly = true;
			this.Column5.Resizable = DataGridViewTriState.True;
			this.Money.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Money.DataPropertyName = "Value";
			dataGridViewCellStyle2.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle2.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			dataGridViewCellStyle2.ForeColor = Color.Red;
			this.Money.DefaultCellStyle = dataGridViewCellStyle2;
			this.Money.HeaderText = "Giá trị";
			this.Money.MinimumWidth = 110;
			this.Money.Name = "Money";
			this.Money.ReadOnly = true;
			this.Money.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Money.Width = 110;
			this.btnTab3Save.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.btnTab3Save.BackColor = Color.FromArgb(192, 255, 255);
			this.btnTab3Save.Cursor = Cursors.Hand;
			this.btnTab3Save.Enabled = false;
			this.btnTab3Save.FlatStyle = FlatStyle.System;
			this.btnTab3Save.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnTab3Save.ImageAlign = ContentAlignment.MiddleLeft;
			this.btnTab3Save.Location = new Point(294, 151);
			this.btnTab3Save.Name = "btnTab3Save";
			this.btnTab3Save.Size = new Size(84, 28);
			this.btnTab3Save.TabIndex = 9;
			this.btnTab3Save.Text = "Ghi nhận";
			this.btnTab3Save.UseVisualStyleBackColor = false;
			this.btnTab3Save.Click += new EventHandler(this.btnTab3Save_Click);
			this.btnTab3Close.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.btnTab3Close.BackColor = Color.FromArgb(192, 255, 255);
			this.btnTab3Close.Cursor = Cursors.Hand;
			this.btnTab3Close.FlatStyle = FlatStyle.System;
			this.btnTab3Close.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnTab3Close.ImageAlign = ContentAlignment.MiddleLeft;
			this.btnTab3Close.Location = new Point(382, 151);
			this.btnTab3Close.Name = "btnTab3Close";
			this.btnTab3Close.Size = new Size(84, 28);
			this.btnTab3Close.TabIndex = 10;
			this.btnTab3Close.Text = "Thoát  [ESC]";
			this.btnTab3Close.UseVisualStyleBackColor = false;
			this.btnTab3Close.Click += new EventHandler(this.btnTab3Close_Click);
			this.tabPage4.Controls.Add(this.label17);
			this.tabPage4.Controls.Add(this.label16);
			this.tabPage4.Controls.Add(this.cbbSizePaper);
			this.tabPage4.Controls.Add(this.txtPerfixOutRetail);
			this.tabPage4.Controls.Add(this.label11);
			this.tabPage4.Controls.Add(this.txtPerfixOut);
			this.tabPage4.Controls.Add(this.label10);
			this.tabPage4.Controls.Add(this.txtPerfixIn);
			this.tabPage4.Controls.Add(this.label9);
			this.tabPage4.Controls.Add(this.btnTab4Save);
			this.tabPage4.Controls.Add(this.btnTab4Close);
			this.tabPage4.Controls.Add(this.rbLaserPrint);
			this.tabPage4.Controls.Add(this.rbScrollPrint);
			this.tabPage4.Location = new Point(4, 24);
			this.tabPage4.Name = "tabPage4";
			this.tabPage4.Padding = new Padding(3);
			this.tabPage4.Size = new Size(472, 185);
			this.tabPage4.TabIndex = 3;
			this.tabPage4.Text = "Mã vạch - Hoá đơn";
			this.tabPage4.UseVisualStyleBackColor = true;
			this.label16.AutoSize = true;
			this.label16.Location = new Point(263, 24);
			this.label16.Name = "label16";
			this.label16.Size = new Size(140, 15);
			this.label16.TabIndex = 20;
			this.label16.Text = "Khổ giấy hoá đơn bán lẻ";
			this.cbbSizePaper.FlatStyle = FlatStyle.System;
			this.cbbSizePaper.FormattingEnabled = true;
			this.cbbSizePaper.Items.AddRange(new object[]
			{
				"Khổ giấy A5",
				"Khổ giấy K80"
			});
			this.cbbSizePaper.Location = new Point(266, 48);
			this.cbbSizePaper.Name = "cbbSizePaper";
			this.cbbSizePaper.Size = new Size(137, 23);
			this.cbbSizePaper.TabIndex = 19;
			this.txtPerfixOutRetail.Location = new Point(140, 75);
			this.txtPerfixOutRetail.Name = "txtPerfixOutRetail";
			this.txtPerfixOutRetail.Size = new Size(100, 21);
			this.txtPerfixOutRetail.TabIndex = 18;
			this.label11.AutoSize = true;
			this.label11.Location = new Point(23, 78);
			this.label11.Name = "label11";
			this.label11.Size = new Size(113, 15);
			this.label11.TabIndex = 17;
			this.label11.Text = "TT hoá đơn bán lẻ :";
			this.txtPerfixOut.Location = new Point(140, 48);
			this.txtPerfixOut.Name = "txtPerfixOut";
			this.txtPerfixOut.Size = new Size(100, 21);
			this.txtPerfixOut.TabIndex = 16;
			this.label10.AutoSize = true;
			this.label10.Location = new Point(5, 51);
			this.label10.Name = "label10";
			this.label10.Size = new Size(131, 15);
			this.label10.TabIndex = 15;
			this.label10.Text = "TT hoá đơn bán buôn :";
			this.txtPerfixIn.Location = new Point(140, 21);
			this.txtPerfixIn.Name = "txtPerfixIn";
			this.txtPerfixIn.Size = new Size(100, 21);
			this.txtPerfixIn.TabIndex = 14;
			this.label9.AutoSize = true;
			this.label9.Location = new Point(29, 24);
			this.label9.Name = "label9";
			this.label9.Size = new Size(107, 15);
			this.label9.TabIndex = 13;
			this.label9.Text = "TT hoá đơn nhập :";
			this.btnTab4Save.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.btnTab4Save.BackColor = Color.FromArgb(192, 255, 255);
			this.btnTab4Save.Cursor = Cursors.Hand;
			this.btnTab4Save.FlatStyle = FlatStyle.System;
			this.btnTab4Save.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnTab4Save.ImageAlign = ContentAlignment.MiddleLeft;
			this.btnTab4Save.Location = new Point(294, 151);
			this.btnTab4Save.Name = "btnTab4Save";
			this.btnTab4Save.Size = new Size(84, 28);
			this.btnTab4Save.TabIndex = 11;
			this.btnTab4Save.Text = "Ghi nhận";
			this.btnTab4Save.UseVisualStyleBackColor = false;
			this.btnTab4Save.Click += new EventHandler(this.btnTab4Save_Click);
			this.btnTab4Close.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.btnTab4Close.BackColor = Color.FromArgb(192, 255, 255);
			this.btnTab4Close.Cursor = Cursors.Hand;
			this.btnTab4Close.FlatStyle = FlatStyle.System;
			this.btnTab4Close.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnTab4Close.ImageAlign = ContentAlignment.MiddleLeft;
			this.btnTab4Close.Location = new Point(382, 151);
			this.btnTab4Close.Name = "btnTab4Close";
			this.btnTab4Close.Size = new Size(84, 28);
			this.btnTab4Close.TabIndex = 12;
			this.btnTab4Close.Text = "Thoát  [ESC]";
			this.btnTab4Close.UseVisualStyleBackColor = false;
			this.btnTab4Close.Click += new EventHandler(this.btnTab4Close_Click);
			this.tabPage5.Controls.Add(this.label15);
			this.tabPage5.Controls.Add(this.label14);
			this.tabPage5.Controls.Add(this.tab5BtnSave);
			this.tabPage5.Controls.Add(this.tab5BtnClose);
			this.tabPage5.Controls.Add(this.btnReset);
			this.tabPage5.Controls.Add(this.label12);
			this.tabPage5.Controls.Add(this.txtshortDateFormat);
			this.tabPage5.Controls.Add(this.label13);
			this.tabPage5.Controls.Add(this.txtsLongDate);
			this.tabPage5.Location = new Point(4, 24);
			this.tabPage5.Name = "tabPage5";
			this.tabPage5.Padding = new Padding(3);
			this.tabPage5.Size = new Size(472, 185);
			this.tabPage5.TabIndex = 4;
			this.tabPage5.Text = "Định dạng ngày tháng";
			this.tabPage5.UseVisualStyleBackColor = true;
			this.label15.AutoSize = true;
			this.label15.Location = new Point(116, 95);
			this.label15.Name = "label15";
			this.label15.Size = new Size(330, 15);
			this.label15.TabIndex = 54;
			this.label15.Text = "d,dd : Ngày; ddd, dddd : Ngày trong tuần; M : Tháng; y : Năm";
			this.label14.AutoSize = true;
			this.label14.Location = new Point(19, 95);
			this.label14.Name = "label14";
			this.label14.Size = new Size(91, 15);
			this.label14.TabIndex = 53;
			this.label14.Text = "Ý nghĩa mô tả  :";
			this.tab5BtnSave.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.tab5BtnSave.BackColor = Color.FromArgb(192, 255, 255);
			this.tab5BtnSave.Cursor = Cursors.Hand;
			this.tab5BtnSave.FlatStyle = FlatStyle.System;
			this.tab5BtnSave.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.tab5BtnSave.ImageAlign = ContentAlignment.MiddleLeft;
			this.tab5BtnSave.Location = new Point(294, 151);
			this.tab5BtnSave.Name = "tab5BtnSave";
			this.tab5BtnSave.Size = new Size(84, 28);
			this.tab5BtnSave.TabIndex = 51;
			this.tab5BtnSave.Text = "Ghi nhận";
			this.tab5BtnSave.UseVisualStyleBackColor = false;
			this.tab5BtnSave.Click += new EventHandler(this.tab5BtnSave_Click);
			this.tab5BtnClose.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.tab5BtnClose.BackColor = Color.FromArgb(192, 255, 255);
			this.tab5BtnClose.Cursor = Cursors.Hand;
			this.tab5BtnClose.FlatStyle = FlatStyle.System;
			this.tab5BtnClose.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.tab5BtnClose.ImageAlign = ContentAlignment.MiddleLeft;
			this.tab5BtnClose.Location = new Point(382, 151);
			this.tab5BtnClose.Name = "tab5BtnClose";
			this.tab5BtnClose.Size = new Size(84, 28);
			this.tab5BtnClose.TabIndex = 52;
			this.tab5BtnClose.Text = "Thoát  [ESC]";
			this.tab5BtnClose.UseVisualStyleBackColor = false;
			this.tab5BtnClose.Click += new EventHandler(this.tab5BtnClose_Click);
			this.btnReset.BackColor = Color.FromArgb(192, 255, 255);
			this.btnReset.FlatAppearance.BorderSize = 0;
			this.btnReset.FlatStyle = FlatStyle.System;
			this.btnReset.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnReset.ForeColor = Color.Black;
			this.btnReset.Location = new Point(210, 151);
			this.btnReset.Name = "btnReset";
			this.btnReset.Size = new Size(80, 28);
			this.btnReset.TabIndex = 50;
			this.btnReset.Text = "Khởi tạo";
			this.btnReset.UseVisualStyleBackColor = false;
			this.btnReset.Click += new EventHandler(this.btnReset_Click);
			this.label12.AutoSize = true;
			this.label12.Location = new Point(25, 54);
			this.label12.Name = "label12";
			this.label12.Size = new Size(85, 15);
			this.label12.TabIndex = 49;
			this.label12.Text = "Ngày thu gọn :";
			this.txtshortDateFormat.Location = new Point(114, 51);
			this.txtshortDateFormat.Name = "txtshortDateFormat";
			this.txtshortDateFormat.Size = new Size(312, 21);
			this.txtshortDateFormat.TabIndex = 48;
			this.label13.AutoSize = true;
			this.label13.Location = new Point(30, 24);
			this.label13.Name = "label13";
			this.label13.Size = new Size(80, 15);
			this.label13.TabIndex = 47;
			this.label13.Text = "Ngày đầy đủ :";
			this.txtsLongDate.Location = new Point(114, 21);
			this.txtsLongDate.Name = "txtsLongDate";
			this.txtsLongDate.Size = new Size(313, 21);
			this.txtsLongDate.TabIndex = 46;
			this.rbLaserPrint.AutoSize = true;
			this.rbLaserPrint.Location = new Point(308, 103);
			this.rbLaserPrint.Name = "rbLaserPrint";
			this.rbLaserPrint.Size = new Size(94, 19);
			this.rbLaserPrint.TabIndex = 1;
			this.rbLaserPrint.TabStop = true;
			this.rbLaserPrint.Text = "Máy in Laser";
			this.rbLaserPrint.UseVisualStyleBackColor = true;
			this.rbScrollPrint.AutoSize = true;
			this.rbScrollPrint.Location = new Point(140, 103);
			this.rbScrollPrint.Name = "rbScrollPrint";
			this.rbScrollPrint.Size = new Size(162, 19);
			this.rbScrollPrint.TabIndex = 0;
			this.rbScrollPrint.TabStop = true;
			this.rbScrollPrint.Text = "Máy in cuộn chuyên dụng";
			this.rbScrollPrint.UseVisualStyleBackColor = true;
			this.label17.AutoSize = true;
			this.label17.Location = new Point(7, 105);
			this.label17.Name = "label17";
			this.label17.Size = new Size(130, 15);
			this.label17.TabIndex = 21;
			this.label17.Text = "Máy in tem [ Mã vạch ] :";
			base.AutoScaleDimensions = new SizeF(7f, 15f);
			//base.AutoScaleMode = AutoScaleMode.Font;
			base.ClientSize = new Size(482, 217);
			base.Controls.Add(this.tabCodeID);
			this.Cursor = Cursors.Hand;
			this.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			//base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
			//base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
			base.KeyPreview = true;
			base.MaximizeBox = false;
			this.MaximumSize = new Size(498, 251);
			base.MinimizeBox = false;
			this.MinimumSize = new Size(498, 251);
			base.Name = "FrmCongif";
			base.ShowInTaskbar = false;
			base.StartPosition = FormStartPosition.CenterScreen;
			this.Text = " .: Cấu hình hệ thống";
			base.Load += new EventHandler(this.FrmCongif_Load);
			base.KeyDown += new KeyEventHandler(this.FrmCongif_KeyDown);
			this.tabPage1.ResumeLayout(false);
			this.tabPage1.PerformLayout();
			this.tabCodeID.ResumeLayout(false);
			this.tabPage2.ResumeLayout(false);
			this.tabPage2.PerformLayout();
			((ISupportInitialize)this.nudNumberProduct).EndInit();
			((ISupportInitialize)this.nudNumber).EndInit();
			this.tabPage3.ResumeLayout(false);
			((ISupportInitialize)this.dgvSysParameter).EndInit();
			this.tabPage4.ResumeLayout(false);
			this.tabPage4.PerformLayout();
			this.tabPage5.ResumeLayout(false);
			this.tabPage5.PerformLayout();
			base.ResumeLayout(false);
		}
		public FrmCongif()
		{
			this.InitializeComponent();
		}
		private void CmdSave_Click(object sender, EventArgs e)
		{
			base.Close();
		}
		private void GetConfig()
		{
			try
			{
				this.TxtServer.Text = ConfigurationManager.AppSettings["ServerName"].ToString();
				this.TxtData.Text = ConfigurationManager.AppSettings["DataBase"].ToString();
				this.TxtUserID.Text = ConfigurationManager.AppSettings["UserID"].ToString();
				this.TxtPass.Text = ConfigurationManager.AppSettings["PassWord"].ToString();
			}
			catch
			{
			}
		}
		private void FrmCongif_Load(object sender, EventArgs e)
		{
			try
			{
				RegistryKey registryKey = Registry.CurrentUser.OpenSubKey("Software\\TVSGPP", true);
				if (registryKey == null)
				{
					RegistryKey registryKey2 = Registry.CurrentUser.OpenSubKey("Software", true);
					registryKey2.CreateSubKey("TVSGPP");
					registryKey2.Close();
				}
				registryKey.Close();
			}
			catch
			{
			}
			try
			{
				RegistryKey registryKey3 = Registry.CurrentUser.OpenSubKey("Software\\TVSGPP", true);
				this.cbbSizePaper.SelectedIndex = int.Parse(registryKey3.GetValue("BillRetailZisePaper").ToString());
				registryKey3.Close();
			}
			catch
			{
			}
			if (this.isFirst)
			{
				this.tabBtn2Save.Enabled = false;
				this.btnTab3Save.Enabled = false;
				this.btnTab4Save.Enabled = false;
			}
			Program.strConnectionString = this.objFunc.strConnectionString;
			this.GetConfig();
			if (this.objFunc.checkWarningNumber())
			{
				this.ckbWarningNumber.Checked = true;
			}
			else
			{
				this.ckbWarningNumber.Checked = false;
			}
			if (this.objFunc.checkWarningDate())
			{
				this.ckbWarningDate.Checked = true;
			}
			else
			{
				this.ckbWarningDate.Checked = false;
			}
			try
			{
				this.nudNumber.Value = this.objFunc.getWarningDay();
			}
			catch
			{
				this.nudNumber.Value = 10m;
			}
			try
			{
				this.nudNumberProduct.Value = this.objFunc.getWarningNumberProduct();
			}
			catch
			{
				this.nudNumberProduct.Value = 10m;
			}
			this.getSysparameter();
			if (this.objFunc.GetPrintBarcodeType() == 1)
			{
				this.rbLaserPrint.Checked = true;
			}
			else
			{
				this.rbScrollPrint.Checked = true;
			}
			this.txtPerfixIn.Text = this.objFunc.GetPerfixIn();
			this.txtPerfixOut.Text = this.objFunc.GetPerfixOut();
			this.txtPerfixOutRetail.Text = this.objFunc.GetPerfixOutRetail();
			RegistryKey registryKey4 = Registry.CurrentUser.OpenSubKey("Control Panel\\International", true);
			this.txtsLongDate.Text = registryKey4.GetValue("sLongDate").ToString();
			this.txtshortDateFormat.Text = registryKey4.GetValue("sShortDate").ToString();
			registryKey4.Close();
		}
		private void CmdTest_Click(object sender, EventArgs e)
		{
			SqlConnection sqlConnection = new SqlConnection(string.Concat(new string[]
			{
				"Server=",
				this.TxtServer.Text,
				"; Initial Catalog=",
				this.TxtData.Text,
				"; User Id=",
				this.TxtUserID.Text,
				"; pwd=",
				this.TxtPass.Text,
				";"
			}));
			try
			{
				sqlConnection.Open();
				this.UpdateKey("ServerName", this.TxtServer.Text);
				this.UpdateKey("DataBase", this.TxtData.Text);
				this.UpdateKey("UserID", this.TxtUserID.Text);
				this.UpdateKey("PassWord", this.TxtPass.Text);
				ConfigurationManager.RefreshSection("appSettings");
				this.GetConfig();
				MessageBox.Show("Kiểm tra thông số kết nối máy chủ thành công\r\n\r\nThông tin đã được ghi vào hệ thống!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
			}
			catch (Exception ex)
			{
				MessageBox.Show(ex.Message);
			}
			finally
			{
				sqlConnection.Close();
				sqlConnection.Dispose();
			}
		}
		public void UpdateKey(string strKey, string newValue)
		{
			this.xmlDoc.Load(AppDomain.CurrentDomain.BaseDirectory + "App.config");
			if (!this.KeyExists(strKey))
			{
				throw new ArgumentNullException("Key", "<" + strKey + "> does not exist in the configuration. Update failed.");
			}
			XmlNode xmlNode = this.xmlDoc.SelectSingleNode("configuration/appSettings");
			foreach (XmlNode xmlNode2 in xmlNode)
			{
				if (xmlNode2.Attributes["key"].Value == strKey)
				{
					xmlNode2.Attributes["value"].Value = newValue;
				}
			}
			this.xmlDoc.Save(AppDomain.CurrentDomain.BaseDirectory + "App.config");
			this.xmlDoc.Save(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile);
		}
		public bool KeyExists(string strKey)
		{
			this.xmlDoc.Load(AppDomain.CurrentDomain.BaseDirectory + "App.config");
			XmlNode xmlNode = this.xmlDoc.SelectSingleNode("configuration/appSettings");
			bool result;
			foreach (XmlNode xmlNode2 in xmlNode)
			{
				if (xmlNode2.Attributes["key"].Value == strKey)
				{
					result = true;
					return result;
				}
			}
			result = false;
			return result;
		}
		private void FrmCongif_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Escape)
			{
				base.Close();
			}
		}
		private void tab2btnClose_Click(object sender, EventArgs e)
		{
			base.Close();
		}
		private void tabBtn2Save_Click(object sender, EventArgs e)
		{
			if (this.ckbWarningNumber.Checked)
			{
				this.objFunc.setWarningDayStatus(1);
			}
			else
			{
				this.objFunc.setWarningDayStatus(0);
			}
			if (this.ckbWarningDate.Checked)
			{
				this.objFunc.setWarningDateStatus(1);
			}
			else
			{
				this.objFunc.setWarningDateStatus(0);
			}
			this.objFunc.setWarningDay(int.Parse(this.nudNumber.Value.ToString()));
			this.objFunc.setWarningNumber(int.Parse(this.nudNumberProduct.Value.ToString()));
			MessageBox.Show("Dữ liệu đã được cập nhật vào hệ thống!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
		}
		private void getSysparameter()
		{
			this.dgvSysParameter.AutoGenerateColumns = false;
			try
			{
				SqlConnection sqlConnection = new SqlConnection(Program.strConnectionString);
				SqlDataAdapter sqlDataAdapter = new SqlDataAdapter();
				string cmdText = "SELECT * FROM [TabSysParamater]";
				sqlDataAdapter.SelectCommand = new SqlCommand(cmdText, sqlConnection);
				DataSet dataSet = new DataSet();
				sqlConnection.Open();
				sqlDataAdapter.Fill(dataSet, "TabSysParamater");
				this.dgvSysParameter.DataSource = dataSet.Tables[0];
				sqlConnection.Close();
				sqlConnection.Dispose();
				dataSet.Dispose();
			}
			catch
			{
			}
		}
		private void btnTab3Save_Click(object sender, EventArgs e)
		{
			if (MessageBox.Show("Bạn có chắc chắn muốn thay đổi thông số hệ thống không?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
			{
				for (int i = 0; i < this.dgvSysParameter.RowCount; i++)
				{
					if (this.dgvSysParameter.Rows[i].Cells[2].Value.ToString() == "True")
					{
						this.UpdateSysParameter(this.dgvSysParameter.Rows[i].Cells[0].Value.ToString(), 1, float.Parse(this.dgvSysParameter.Rows[i].Cells[3].Value.ToString()));
					}
					else
					{
						this.UpdateSysParameter(this.dgvSysParameter.Rows[i].Cells[0].Value.ToString(), 0, float.Parse(this.dgvSysParameter.Rows[i].Cells[3].Value.ToString()));
					}
				}
				this.dgvSysParameter.ReadOnly = true;
				this.btnTab3Save.Enabled = false;
				this.dgvSysParameter.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
				this.getSysparameter();
				MessageBox.Show("Dữ liệu đã được cập nhật vào hệ thống!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
			}
		}
		private void btnEdit_Click(object sender, EventArgs e)
		{
			this.dgvSysParameter.ReadOnly = false;
			this.btnTab3Save.Enabled = true;
			this.dgvSysParameter.SelectionMode = DataGridViewSelectionMode.ColumnHeaderSelect;
		}
		private void btnTab3Close_Click(object sender, EventArgs e)
		{
			base.Close();
		}
		public int UpdateSysParameter(string ID, int Active, float Value)
		{
			int result;
			try
			{
				SqlConnection sqlConnection = new SqlConnection(Program.strConnectionString);
				sqlConnection.Open();
				SqlCommand sqlCommand = new SqlCommand("UpdateSysParameter", sqlConnection);
				sqlCommand.CommandType = CommandType.StoredProcedure;
				sqlCommand.Parameters.Add("ID", SqlDbType.VarChar, 150);
				sqlCommand.Parameters.Add("Active", SqlDbType.Bit);
				sqlCommand.Parameters.Add("Value", SqlDbType.Float);
				sqlCommand.Parameters["ID"].Value = ID;
				sqlCommand.Parameters["Active"].Value = Active;
				sqlCommand.Parameters["Value"].Value = Value;
				sqlCommand.ExecuteNonQuery();
				sqlConnection.Close();
				sqlConnection.Dispose();
				result = 0;
			}
			catch
			{
				result = 1;
			}
			return result;
		}
		private void btnTab4Save_Click(object sender, EventArgs e)
		{
			try
			{
				RegistryKey registryKey = Registry.CurrentUser.OpenSubKey("Software\\TVSGPP", true);
				registryKey.SetValue("BillRetailZisePaper", this.cbbSizePaper.SelectedIndex.ToString());
				registryKey.Close();
			}
			catch (Exception ex)
			{
				MessageBox.Show(ex.Message);
			}
			if (this.rbLaserPrint.Checked)
			{
				this.objFunc.SetPrintBarcodeType(1);
			}
			else
			{
				this.objFunc.SetPrintBarcodeType(0);
			}
			if (this.txtPerfixIn.Text != "")
			{
				this.objFunc.SetPerfixIn(this.txtPerfixIn.Text.ToUpper());
			}
			if (this.txtPerfixOut.Text != "")
			{
				this.objFunc.SetPerfixOut(this.txtPerfixOut.Text.ToUpper());
			}
			if (this.txtPerfixOutRetail.Text != "")
			{
				this.objFunc.SetPerfixOutRetail(this.txtPerfixOutRetail.Text.ToUpper());
			}
			MessageBox.Show("Dữ liệu đã được cập nhật vào hệ thống!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
		}
		private void btnTab4Close_Click(object sender, EventArgs e)
		{
			base.Close();
		}
		private void button2_Click(object sender, EventArgs e)
		{
			base.Close();
		}
		private void btnReset_Click(object sender, EventArgs e)
		{
			this.txtsLongDate.Text = "";
			this.txtshortDateFormat.Text = "";
			this.tab5BtnSave.PerformClick();
		}
		private void tab5BtnSave_Click(object sender, EventArgs e)
		{
			RegistryKey registryKey = Registry.CurrentUser.OpenSubKey("Control Panel\\International", true);
			string value;
			if (this.txtshortDateFormat.Text.Trim() != "")
			{
				value = this.txtshortDateFormat.Text.Trim();
			}
			else
			{
				value = "dd/MM/yyyy";
			}
			string value2;
			if (this.txtsLongDate.Text.Trim() != "")
			{
				value2 = this.txtsLongDate.Text.Trim();
			}
			else
			{
				value2 = "dd/MM/yyyy";
			}
			registryKey.SetValue("sShortDate", value);
			registryKey.SetValue("sLongDate", value2);
			registryKey.Close();
			MessageBox.Show("Dữ liệu đã được cập nhật vào hệ thống!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
		}
		private void tab5BtnClose_Click(object sender, EventArgs e)
		{
			base.Close();
		}
	}
}
